<?php
use_helper('Text');
?>

<?php include_partial('back/show', array('uri' => '@gallery_photos')); ?>
<h1 class="title">Galerie photos > <?php echo truncate_text($photos_list[0][ 'Category' ][ 'title' ], 60, '...') ?></h1>

<ul class="list-photo">
<?php
$i = 0;
foreach($photos_list as $photo){?>

    <?php $imagesAttributes = Utils::getImageSize($photo['sfAsset'][ 'Folder' ][ 'relative_path' ], $photo['sfAsset'], 75, 75); ?>
    <li>
        <a href="<?php echo url_for('@gallery_photos_show_detail_photo?title_slug=' . $slug_category . '&filename_slug=' .$photo['sfAsset'][ 'slug' ]) ?>">
            <img title="<?php echo $photo['sfAsset'][ 'slug' ] ?>" alt="<?php echo $photo['sfAsset'][ 'slug' ] ?>"
                 src="<?php echo $imagesAttributes['small']['url'] ?>" width="<?php echo intval($imagesAttributes['small']['width']/2) ?>" height="<?php echo intval($imagesAttributes['small']['height']/2) ?>" />
        </a>
    </li>
<?php
$i++;
if($i == 5) break;
}?>
</ul>

<?php $imagesAttributes = Utils::getImageSize($current_photo['sfAsset'][ 'Folder' ][ 'relative_path' ], $current_photo['sfAsset'], 550, 400); ?>
<div id="big-image">
    <a class="lightbox" href="<?php echo $imagesAttributes['large']['url'] ?>">
        <img title="<?php echo $current_photo['sfAsset'][ 'slug' ] ?>" alt="<?php echo $current_photo['sfAsset'][ 'slug' ] ?>"
             src="<?php echo $imagesAttributes['large']['url'] ?>" width="<?php echo $imagesAttributes['large']['width'] ?>" height="<?php echo $imagesAttributes['large']['height'] ?>" style="margin-top: <?php echo $imagesAttributes['large']['marginTop'] ?>px; margin-left: <?php echo $imagesAttributes['large']['marginLeft'] ?>px" />
    </a>
    <?php include_partial('facebook/like') ?>
</div>

<ul class="list-photo bottom">
<?php
$i = 0;
foreach($photos_list as $photo){?>
    <?php if($i>4){ ?>
    <?php $imagesAttributes = Utils::getImageSize($photo['sfAsset'][ 'Folder' ][ 'relative_path' ], $photo['sfAsset'], 75, 75); ?>
    <li>
        <a href="<?php echo url_for('@gallery_photos_show_detail_photo?title_slug=' . $slug_category . '&filename_slug=' .$photo['sfAsset'][ 'slug' ]) ?>">
            <img title="<?php echo $photo['sfAsset'][ 'slug' ] ?>" alt="<?php echo $photo['sfAsset'][ 'slug' ] ?>"
                 src="<?php echo $imagesAttributes['small']['url'] ?>" width="<?php echo intval($imagesAttributes['small']['width']/2) ?>" height="<?php echo intval($imagesAttributes['small']['height']/2) ?>" />
        </a>
    </li>
    <?php }?>
<?php
$i++;
}?>
</ul>

<div class="push_float"></div>

<?php include_component('comment', 'list', array('object' => $current_photo, 'i' => 0)) ?>